package com.tanhua.dubbo.api;

import com.tanhua.model.enums.ActionType;
import com.tanhua.model.mongo.Comment;
import com.tanhua.model.mongo.FocusUser;
import com.tanhua.model.mongo.Video;
import com.tanhua.model.vo.PageResult;
import org.bson.types.ObjectId;

import java.util.List;

public interface VideoApi {

    //保存视频
    String save(Video video);

    //根据vid查询数据列表
    List<Video> findMovementsByVids(List<Long> vids);

    //分页查询数据列表
    List<Video> queryVideoList(int page, Integer pagesize);

    //根据用户id查询
    PageResult findByUserId(Integer page, Integer pagesize, Long userId);



    //查询用户是否已经关注
    boolean hasFollowed(Long userId, Long videoUserId);
    //关注/取消关注
    void followOrNot(FocusUser focusUser, ActionType actionType);
    //更新视频点赞数量
    void likeOrDislike(ObjectId videoId, ActionType actionType);
    //查询评论列表
    List<Comment> queryComments(ObjectId videoId, Integer page, Integer pagesize);
    //根据id查询
    Video findById(ObjectId videoId);
    //保存视频评论
    void saveVideoComment(Comment comment);
    //更新视频评论点赞数量
    void likeOrDislikeComment(ObjectId commentId, ActionType actionType);


}


